package com.manage.project.biz.service.impl;


import com.manage.project.biz.domain.CivilEnginneeringRegularCheck;
import com.manage.project.biz.mapper.CivilEnginneeringRegularCheckMapper;
import com.manage.project.biz.service.IBizGongluService;
import com.manage.project.biz.service.ICivilEnginneeringRegularCheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * 土建结构定期检查Service业务层处理
 *
 * @author 小赵
 * @date 2022-04-25
 */
@Service
public class CivilEnginneeringRegularCheckServiceImpl implements ICivilEnginneeringRegularCheckService
{
    @Autowired
    private CivilEnginneeringRegularCheckMapper civilEnginneeringRegularCheckMapper;
    @Autowired
    private IBizGongluService roadInfoService;


    /*获取各分项设施的最大值*/
    @Override
    public int getMaxByTunnelNameAndFacilityName(String tunnelName, String facilityName, Date inspectionDate) {
        return civilEnginneeringRegularCheckMapper.getMaxByName(tunnelName,facilityName,inspectionDate);
    }

    @Override
    public List<CivilEnginneeringRegularCheck> getByTunnelNameAndFacilityName(String tunnelName, String facilityName, Date inspectionDate) {
        return civilEnginneeringRegularCheckMapper.getByNameAndDate(tunnelName,facilityName,inspectionDate);
    }

    @Override
    public CivilEnginneeringRegularCheck selectCivilEnginneeringRegularCheckByRegularCheckId(Long regularCheckId)
    {
        return civilEnginneeringRegularCheckMapper.selectCivilEnginneeringRegularCheckByRegularCheckId(regularCheckId);
    }


    @Override
    public List<CivilEnginneeringRegularCheck> selectCivilEnginneeringRegularCheckList(CivilEnginneeringRegularCheck civilEnginneeringRegularCheck)
    {
        return civilEnginneeringRegularCheckMapper.selectCivilEnginneeringRegularCheckList(civilEnginneeringRegularCheck);
    }


    @Override
    public int insertCivilEnginneeringRegularCheck(CivilEnginneeringRegularCheck civilEnginneeringRegularCheck)
    {

             return civilEnginneeringRegularCheckMapper.insertCivilEnginneeringRegularCheck(civilEnginneeringRegularCheck);
    }


    @Override
    public int updateCivilEnginneeringRegularCheck(CivilEnginneeringRegularCheck civilEnginneeringRegularCheck)
    {
        return civilEnginneeringRegularCheckMapper.updateCivilEnginneeringRegularCheck(civilEnginneeringRegularCheck);
    }


    @Override
    public int deleteCivilEnginneeringRegularCheckByRegularCheckIds(Long[] regularCheckIds)
    {
        return civilEnginneeringRegularCheckMapper.deleteCivilEnginneeringRegularCheckByRegularCheckIds(regularCheckIds);
    }


    @Override
    public int deleteCivilEnginneeringRegularCheckByRegularCheckId(Long regularCheckId)
    {
        return civilEnginneeringRegularCheckMapper.deleteCivilEnginneeringRegularCheckByRegularCheckId(regularCheckId);
    }
}
